﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NyanBankIntfTool
{
    class BankIntfParserOption
    {
        public ParseTypes ParseType;
        public const string DictFileName = @".\Config\Dictionary.ini"; //字典文件路径
        public const string FileListFileName = @".\Config\FileList.ini"; //文件列表文件路径
        public string fileListName;

        public string DbfPath { get; set; } //DBF文件路径
        public string OutputPath { get; set; } //输出路径

        public bool IsOutputExtraExcel { get; set; } //是否输出额外Excel
        public bool IsOutput2Template { get; set; } //是否输出到模板
        public bool IsParseDbf { get; set; } //是否解析DBF
        public bool IsParseLog { get; set; } //是否解析日志
        
        public string BusinBeginTime { get; set; } //业务开始时间
        public string BusinEndTime { get; set; } //业务结束时间
        public string BusinDate { get; set; } //业务验收日期
        
        public bool IsHaveBusinBeginTime => BusinBeginTime.Length != 0; //是否启用业务开始时间
        public bool IsHaveBusinEndTime => BusinEndTime.Length != 0; //是否启用业务结束时间
        public bool IsHaveBusinDate => BusinDate.Length != 0; //是否启用业务日期
    }

    class BankIntfParserOptionCmds : BankIntfParserOption
    {
        public BankIntfParserOptionCmds()
        {
            ParseType = ParseTypes.CMDS;
            fileListName = "CMDSFileList"; //文件列表名
        }
        private const string TemplateFileName = @".\Config\CMDS验收模板.xlsx"; //模板文件名

        public string OutputSafeFileName { get; set; } //输出文件名
        public string IMixLogFileName { get; set; }
        public string ClientLogFileName { get; set; }
        public bool IsHaveStableDate => StableDate.Length != 0; //是否启用稳定性日期
        public bool IsHaveNonBusinDate => NonBusinDate.Length != 0; //是否启用非业务日期
        public string StableDate { get; set; } //稳定性验收日期
        public string StableDays { get; set; } //稳定性验收天数
        public string NonBusinDate { get; set; } //非业务验收日期
        public string NonBusinDays { get; set; } //非业务验收天数
    }

    class BankIntfParserOptionCstp : BankIntfParserOption
    {
        public BankIntfParserOptionCstp()
        {
            ParseType = ParseTypes.CSTP;
            fileListName = "CSTPFileList"; //文件列表名
        }
        private const string TemplateFileNameSelf = @".\Config\CMDS验收模板.xlsx"; //模板文件名
        private const string TemplateFileNameAffiliates = @".\Config\CMDS验收模板.xlsx"; //模板文件名
    }

}